package com.fysports.web.model.system;

import com.jfinal.log.Log;
import com.fysports.web.model.BaseModel;


/**
 * 系统日志记录
 * 记录流程:
 * 1. SystemLogHandler 构建SystemLog,放入request
 * 2. AuthenticationInterceptor 从request中获取 log，进行写值[controller 执行之间状态等等]
 * 3. SystemLogHandler 中执行全部流程后，将log存入ThreadSystemLog中，等待线程写入数据库
 * <p>
 * Created by konbluesky
 * Date : 14-9-11 下午4:18
 * Project : JdmData_WebServer
 */
public class SystemLog extends BaseModel<SystemLog> {
    private static Log log = Log.getLog(SystemLog.class);
    public final static SystemLog dao = new SystemLog();
    public final static String COL_USERUUID = "useruuid";
    public final static String COL_USERAGENT = "useragent";


    public SystemLog() {
        if (this.getStr(COL_UUID) == null || this.getStr(COL_UUID).length() == 0) {
            this.set(COL_UUID, generateUUID());
        }
    }
}
